package com.vtech.spring.controller;

import com.vtech.spring.model.User;
import org.apache.shiro.authc.UsernamePasswordToken;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * TODO
 *
 * @author houzhiwei
 * @date 2018/6/9 23:09
 */
@RestController("/auth/")
public class UserController {



    @PostMapping("login")
    public String login(@RequestBody User user) {

        UsernamePasswordToken token = new UsernamePasswordToken(user.getUsername(), user.getPassword());

        return "index";
    }
}
